package com.r2coding.auth.exception;

import lombok.Data;

/**
 * @author:98k灬
 * @since:2022/04/05 21:34
 **/
@Data
public class ServiceException extends RuntimeException {
    private Integer code;

    public ServiceException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public ServiceException(BizCode bizCode) {
        super(bizCode.getMsg());
        this.code = bizCode.getCode();
    }

}
